﻿@{
    ViewBag.Title = "注册";
    Layout = "~/Views/Shared/_LoginLayout.cshtml";
}
@Scripts.Render("~/Scripts/Register")
<el-tabs class="h-tabs" v-model="state.loginType">
    <el-tab-pane label="我是企划方" name="employer"></el-tab-pane>
    <el-tab-pane label="我是画师" name="painter"></el-tab-pane>
</el-tabs>
<el-form ref="ruleFormRef" :rules="rules" :model="state">
    <el-form-item prop="username">
        <el-input v-model="state.username" placeholder="昵称" />
    </el-form-item>
    <el-form-item prop="password">
        <el-input v-model="state.password" type="password" placeholder="密码" />
    </el-form-item>
    <el-form-item prop="phone">
        <el-input v-model="state.phone" placeholder="手机号，仅用于短信通知">
            <template #prepend>
                <el-select class="register-form__phone-prefix phone-prefix-select" v-model="state.num" placeholder="请选择">
                    <el-option label="+86" value="86">
                        <span>+86（中国）</span>
                    </el-option>
                </el-select>
            </template>
        </el-input>
    </el-form-item>
    <el-form-item v-if="state.showCodeInput" prop="phoneCode">
        <el-input v-model="state.phoneCode" placeholder="验证码">
            <template #append>
                <el-button :disabled="codeConfig.disabled" type="text" v-on:click="getCodeBtnOnClick">{{codeConfig.text}}</el-button>
            </template>
        </el-input>
    </el-form-item>
    <section class="register-form__footer">
        <p class="session-form__term">
            请确认您已同意
            <a>《画师帮服务协议》</a>
        </p>
        <el-form-item>
            <el-button class="is-block" size="large" type="primary" v-on:click="subitForm(ruleFormRef)">注册</el-button>
        </el-form-item>
        <a class="register-form__back-login" href="@Url.Action("Index","Login")">已有账号，去登陆</a>
    </section>
</el-form>
